<template>
  <NuxtLayout>
    <van-config-provider
      :theme-vars="{}"
      theme-vars-scope="global">
      <!-- theme-vars="{ primaryColor: '#232323' }" -->
      <!-- <NuxtWelcome /> -->
      <nuxt-page />
    </van-config-provider>
  </NuxtLayout>
</template>
<script setup>
import { onMounted, onBeforeUnmount } from 'vue'

const { $on, $off } = useNuxtApp()
onMounted(() => {
  $on('startGame', () => {
    // enterFullscreen(gameFrameStore.game)
  })
  $on('exitGame', () => {
    // exitFullscreen()
  })
})

onBeforeUnmount(() => {
  $off('startGame')
  $off('exitGame')
})
</script>
